<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
    <title>超级管理平台</title>
    <link rel="stylesheet" href="css/weui.css"/>
    <link rel="stylesheet" href="css/admin_home.css"/>
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
</head>
<body ontouchstart>
    <div class="weui-toptips weui-toptips_warn js_tooltips">错误提示</div>
    <div class="container" id="container"></div>
    <script type="text/html" id="tpl_home">
<div class="page">
    <div class="page__hd">
        <h1 class="page__title">超级管理平台</h1>
        <!-- <p class="page__desc">WeUI 是一套同微信原生视觉体验一致的基础样式库，由微信官方设计团队为微信内网页和微信小程序量身设计，令用户的使用感知更加统一。</p> -->
    </div>
    <div class="page__bd page__bd_spacing">
        <ul>
            <!-- <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">表单</p>
                    <img src="./images/icon_nav_form.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="button" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Button</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="input" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Input</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>List</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="slider" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Slider</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="uploader" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Uploader</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li> -->
            <li class="js_show">
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">酒店相关管理</p>
                    <img src="./images/icon_nav_layout.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-loading data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>酒店列表</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_qrcode" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>添加合作酒店</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="badge" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Badge</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="flex" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Flex</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="footer" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Footer</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="gallery" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Gallery</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="grid" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Grid</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="icons" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Icons</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="loadmore" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Loadmore</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="panel" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Panel</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="preview" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Preview</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="progress" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Progress</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">操作反馈</p>
                    <img src="./images/icon_nav_feedback.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="actionsheet" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Actionsheet</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="dialog" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Dialog</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="msg" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Msg</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="picker" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Picker</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="toast" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Toast</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">导航相关</p>
                    <img src="./images/icon_nav_nav.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="navbar" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Navbar</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="tabbar" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Tabbar</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">搜索相关</p>
                    <img src="./images/icon_nav_search.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="searchbar" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Search Bar</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_item" data-id="layers">
                    <p class="weui-flex__item">层级规范</p>
                    <img src="./images/icon_nav_z-index.png" alt="">
                </div>
            </li>
        </ul>
    </div>
    <div class="weui-footer">
        <p class="weui-footer__text">Copyright © 2008-2016 jiudiangou.com</p>
    </div>
</div>
<script type="text/javascript">
alert(1);
    $(function(){
        var winH = $(window).height();
        var categorySpace = 10;
        $('.js_item').on('click', function(){
            var id = $(this).data('id');
                window.pageManager.go(id);

        });
        $('.js_category').on('click', function(){
            var $this = $(this),
                $inner = $this.next('.js_categoryInner'),
                $page = $this.parents('.page'),
                $parent = $(this).parent('li');
            var innerH = $inner.data('height');
            bear = $page;

            if(!innerH){
                $inner.css('height', 'auto');
                innerH = $inner.height();
                $inner.removeAttr('style');
                $inner.data('height', innerH);
            }

            if($parent.hasClass('js_show')){
                // $parent.removeClass('js_show');
            }else{
                $parent.siblings().removeClass('js_show');

                $parent.addClass('js_show');
                if(this.offsetTop + this.offsetHeight + innerH > $page.scrollTop() + winH){
                    var scrollTop = this.offsetTop + this.offsetHeight + innerH - winH + categorySpace;

                    if(scrollTop > this.offsetTop){
                        scrollTop = this.offsetTop - categorySpace;
                    }

                    $page.scrollTop(scrollTop);
                }
            }
        });

        // loading.hide();

        // $(loading).prependTo('#container > div');
        // setTimeout(function () {
        //     loading.hide(function() {
        //          console.log('`loading` has been hidden');
        //      });
        // }, 3000);
    });
</script>

</script>
    <script type="text/html" id="tpl_merchant_list">
<div class="page">
    <div class="page__hd">
        <h1 class="page__title">酒店列表</h1>
        <!-- <p class="page__desc">WeUI 是一套同微信原生视觉体验一致的基础样式库，由微信官方设计团队为微信内网页和微信小程序量身设计，令用户的使用感知更加统一。</p> -->
    </div>
    <div class="page__bd page__bd_spacing">
        <div class="weui-search-bar" id="searchBar">
            <div class="weui-search-bar__form">
                <div class="weui-search-bar__box">
                    <i class="weui-icon-search"></i>
                    <input type="search" class="weui-search-bar__input" id="searchInput" placeholder="搜索" required/>
                    <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
                </div>
                <label class="weui-search-bar__label" id="searchText">
                    <i class="weui-icon-search"></i>
                    <span>搜索</span>
                </label>
            </div>
            <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
        </div>
    </div>
    <div class="page__bd page__bd_spacing">
        <div id="tab2" class="weui_tab_bd_item">
            <form id="form1">
                <div class="content">
                    <div class="weui_cells" data-bind="with:WorkplaceMatchVM">
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>

                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>如家酒店（朝阳门店）</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
                <div class="weui-infinite-scroll hidden">
                    <div class="infinite-preloader"></div>正在加载...</div>
                </div>
            </form>
        </div>
    </div>

    <!-- <div class="page__bd page__bd_spacing">
        <div class="js_categoryInner">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>

                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
                <a class="weui-cell weui-cell_access js_item" data-id="merchant_list" href="javascript:;">
                    <div class="weui-cell__bd">
                        <p>如家酒店（朝阳门店）</p>
                    </div>
                    <div class="weui-cell__ft"></div>
                </a>
            </div>
        </div>
    </div> -->
    <div class="weui-footer">
        <p class="weui-footer__text">Copyright © 2008-2016 jiudiangou.com</p>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        var winH = $(window).height();
        var categorySpace = 10;

        $('.js_item').on('click', function(){
            var id = $(this).data('id');
            window.pageManager.go(id);
        });

        var $searchBar = $('#searchBar'),
            $searchText = $('#searchText'),
            $searchInput = $('#searchInput'),
            $searchClear = $('#searchClear'),
            $searchCancel = $('#searchCancel');

        function hideSearchResult(){
            // $searchResult.hide();
            $searchInput.val('');
        }
        function cancelSearch(){
            hideSearchResult();
            $searchBar.removeClass('weui-search-bar_focusing');
            $searchText.show();
        }

        $searchText.on('click', function(){
            $searchBar.addClass('weui-search-bar_focusing');
            $searchInput.focus();
        });
        $searchInput
            .on('blur', function () {
                if(!this.value.length) cancelSearch();
            })
        ;
        $searchClear.on('click', function(){
            hideSearchResult();
            $searchInput.blur();
        });
        $searchCancel.on('click', function(){
            cancelSearch();
            $searchInput.blur();
        });

        // var loading = false;
        // $("#tab2").infinite().on("infinite", function () {
        //     alert('111');
        //     if (loading) return;
        //     loading = true;
        //     $("#tab2 .weui-infinite-scroll").show();
        //     setTimeout(function () {
        //         loading = false;
        //         $("#tab2 .weui-infinite-scroll").hide();
        //     }, 1000);
        // });
    });
</script>

</script>
    <script type="text/html" id="tpl_merchant_qrcode">
<div class="page">
    <div class="page__hd">
        <h1 class="page__title">添加合作酒店</h1>
        <p class="page__desc">请合作酒店的管理者扫描二维码后填写注册信息</p>
    </div>
    <div class="page__bd loading">
        <div class="weui-loadmore">
            <i class="weui-loading"></i>
            <span class="weui-loadmore__tips">正在加载</span>
        </div>
    </div>
    <div class="page__bd img hidden">
        <article class="weui-article">
            <section>
                <section>
                    <p>
                        <img src="./images/pic_article.png" alt="">
                    </p>
                </section>
            </section>
        </article>
    </div>
    <div class="page__bd page__bd_spacing">
        <a href="javascript:;" class="weui-btn weui-btn_default">刷新二维码</a>
    </div>
    <div class="weui-footer weui-footer_fixed-bottom">
        <p class="weui-footer__text">Copyright © 2008-2016 jiudiangou.com</p>
    </div>
</div>

</script>
    <script type="text/html" id="tpl_home">
<div class="page">
    <div class="page__hd">
        <h1 class="page__title">超级管理平台</h1>
        <!-- <p class="page__desc">WeUI 是一套同微信原生视觉体验一致的基础样式库，由微信官方设计团队为微信内网页和微信小程序量身设计，令用户的使用感知更加统一。</p> -->
    </div>
    <div class="page__bd page__bd_spacing">
        <ul>
            <!-- <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">表单</p>
                    <img src="./images/icon_nav_form.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="button" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Button</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="input" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Input</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>List</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="slider" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Slider</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="uploader" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Uploader</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li> -->
            <li class="js_show">
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">酒店相关管理</p>
                    <img src="./images/icon_nav_layout.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-loading data-id="merchant_list" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>酒店列表</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="merchant_qrcode" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>添加合作酒店</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="badge" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Badge</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="flex" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Flex</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="footer" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Footer</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="gallery" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Gallery</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="grid" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Grid</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="icons" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Icons</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="loadmore" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Loadmore</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="panel" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Panel</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="preview" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Preview</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="progress" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Progress</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">操作反馈</p>
                    <img src="./images/icon_nav_feedback.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="actionsheet" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Actionsheet</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="dialog" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Dialog</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="msg" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Msg</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="picker" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Picker</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="toast" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Toast</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">导航相关</p>
                    <img src="./images/icon_nav_nav.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="navbar" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Navbar</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                        <a class="weui-cell weui-cell_access js_item" data-id="tabbar" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Tabbar</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_category">
                    <p class="weui-flex__item">搜索相关</p>
                    <img src="./images/icon_nav_search.png" alt="">
                </div>
                <div class="page__category js_categoryInner">
                    <div class="weui-cells page__category-content">
                        <a class="weui-cell weui-cell_access js_item" data-id="searchbar" href="javascript:;">
                            <div class="weui-cell__bd">
                                <p>Search Bar</p>
                            </div>
                            <div class="weui-cell__ft"></div>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <div class="weui-flex js_item" data-id="layers">
                    <p class="weui-flex__item">层级规范</p>
                    <img src="./images/icon_nav_z-index.png" alt="">
                </div>
            </li>
        </ul>
    </div>
    <div class="weui-footer">
        <p class="weui-footer__text">Copyright © 2008-2016 jiudiangou.com</p>
    </div>
</div>
<script type="text/javascript">
alert(1);
    $(function(){
        var winH = $(window).height();
        var categorySpace = 10;
        $('.js_item').on('click', function(){
            var id = $(this).data('id');
                window.pageManager.go(id);

        });
        $('.js_category').on('click', function(){
            var $this = $(this),
                $inner = $this.next('.js_categoryInner'),
                $page = $this.parents('.page'),
                $parent = $(this).parent('li');
            var innerH = $inner.data('height');
            bear = $page;

            if(!innerH){
                $inner.css('height', 'auto');
                innerH = $inner.height();
                $inner.removeAttr('style');
                $inner.data('height', innerH);
            }

            if($parent.hasClass('js_show')){
                // $parent.removeClass('js_show');
            }else{
                $parent.siblings().removeClass('js_show');

                $parent.addClass('js_show');
                if(this.offsetTop + this.offsetHeight + innerH > $page.scrollTop() + winH){
                    var scrollTop = this.offsetTop + this.offsetHeight + innerH - winH + categorySpace;

                    if(scrollTop > this.offsetTop){
                        scrollTop = this.offsetTop - categorySpace;
                    }

                    $page.scrollTop(scrollTop);
                }
            }
        });

        // loading.hide();

        // $(loading).prependTo('#container > div');
        // setTimeout(function () {
        //     loading.hide(function() {
        //          console.log('`loading` has been hidden');
        //      });
        // }, 3000);
    });
</script>

</script>
    <script type="text/html" id="tpl_msg_warn">
<div class="page">
    <div class="weui-msg">
        <div class="weui-msg__icon-area"><i class="weui-icon-warn weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
            <h2 class="weui-msg__title">操作失败</h2>
            <p class="weui-msg__desc" id="err_text"></p>
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a id="reScanQRCode" href="javascript:void(0);" class="weui-btn weui-btn_primary">重新扫描</a>
                <a id="closeWindow" href="javascript:void(0);" class="weui-btn weui-btn_default">关闭页面</a>
            </p>
        </div>
        <div class="weui-msg__extra-area">
            <div class="weui-footer">
                <p class="weui-footer__links">
                    <a href="javascript:void(0);" class="weui-footer__link">底部链接文本</a>
                </p>
                <p class="weui-footer__text">Copyright &copy; 2008-2016 weui.io</p>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    if(msg){
        $('title').html(msg);
        $('#err_text').html(msg);
    }

    wx.ready(function(){
        $("#closeWindow").click(function(){
            wx.closeWindow();
        });
        $("#reScanQRCode").click(function(){
            wx.scanQRCode({
                success: function(res){
                    wx.closeWindow();
                }
            });
        });
    });
</script>

</script>
    <script type="text/html" id="tpl_msg_success">
<div class="page">
    <div class="weui-msg">
        <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
            <h2 class="weui-msg__title" id="success"></h2>
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a href="javascript:void(0);" id="success_close" class="weui-btn weui-btn_primary">关闭</a>
            </p>
        </div>
        <div class="weui-msg__extra-area">
            <div class="weui-footer">
                <p class="weui-footer__links">
                    <a href="javascript:void(0);" class="weui-footer__link">底部链接文本</a>
                </p>
                <p class="weui-footer__text">Copyright &copy; 2008-2016 weui.io</p>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $("title").html("注册成功");
    $('#success').html(msg);
    wx.ready(function(){
        $("#success_close").on('click', function(){
            wx.closeWindow();
        });
    });
</script>

</script>

    <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js"></script>
    <script type="text/javascript">
    var jssdk = <%- JSON.stringify(docs.jssdk) %>;
    var token = "<%= docs.token || 0 %>";
    var LOADING;
    jssdk.jsApiList = ["closeWindow"];
    wx.config(jssdk);
    </script>
    <script src="js/admin_home.js"></script>
</body>
</html>
